package com.xuwang.controller;

import com.xuwang.service.impl.ApplyServiceGGImpl;
import com.xuwang.service.impl.CaseFilingServiceGGImpl;
import com.xuwang.service.impl.ComplaintsServiceGGImpl;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @ClassName 统计条数
 * @Description TODO
 * @Author gongzihao
 * @Date 2021/9/22 10:05
 */

@RequestMapping("/statisticsCountController")
@RestController
@Api(value = "StatisticsCountController",tags = "统计接口")
public class StatisticsCountController {

    @Resource
    private CaseFilingServiceGGImpl caseFilingGService;
    @Resource
    private ApplyServiceGGImpl applyGService;
    @Resource
    private ComplaintsServiceGGImpl complaintsGService;

    @GetMapping("/complaintCount")
    public Map<String , Object> selectComplaintCountMonthOrYearCount(@RequestParam("year")String year){
        return complaintsGService.selectCount(Integer.parseInt(year));
    }
    @GetMapping("/applySCount")
    public Map<String , Object> selectApplySCountMonthOrYearCount(@RequestParam("year")String year){
        return applyGService.selectCount(Integer.parseInt(year));
    }
    @GetMapping("/caseFilingCount")
    public Map<String , Object> selectCaseFilingMonthOrYearCount(@RequestParam("year")String year){
        return caseFilingGService.selectCount(Integer.parseInt(year));
    }
}
